﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="RealizarOrdenPedido.aspx.cs" Inherits="SISLOG.Web.RealizarOrdenPedido" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <table>
    <tr>
        <td>
            <fieldset>
                <legend>Orden Pedido</legend>
                    <table style="width: 380px">
                        <tr>
                            <td>Id Orden Pedido: </td>
                            <td>
                                <asp:TextBox ID="idOrdenPedidoTextBox" runat="server" Text='0' Enabled="False" />
                            </td>
                        </tr>
                        <tr>
                            <td>Fecha de Solicitud: </td>
                            <td>
                                <asp:TextBox ID="fechaSolicitudTextBox" runat="server" Text='<%# Bind("fechaSolicitud") %>' />
                            </td>
                        </tr>
                        <tr>
                            <td>Area: </td>
                            <td>
                                <asp:TextBox ID="areaTextBox" runat="server" Text='<%# Bind("area") %>' />
                            </td>
                        </tr>
                        <tr>
                            <td>Supervisor: </td>
                            <td>
                                <asp:TextBox ID="supervisorTextBox" runat="server" Text='<%# Bind("supervisor") %>' />
                            </td>
                        </tr>
                        <tr>
                            <td>Fecha de Entrega: </td>
                            <td>
                                <asp:TextBox ID="fechaEntregaTextBox" runat="server" Text='<%# Bind("fechaEntrega") %>' />
                            </td>
                        </tr>
                    </table>
            </fieldset>
        </td>
        <td>
            <fieldset>
                <legend>Detalle de Orden</legend>
                    <table style="width: 380px">
                        <tr>
                            <td>Descripcion: </td>
                            <td>
                                <asp:TextBox ID="txtDescripcion" runat="server" Text='<%# Bind("descripcion") %>'/>                            
                            &nbsp;&nbsp;&nbsp;&nbsp;
                                <asp:Button ID="btnBuscarMaterial" runat="server" Text="..." Width="38px" />
                                <ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender1" runat="server" 
                                    PopupControlID="pnlMaterial" TargetControlID="btnBuscarMaterial" 
                                    BackgroundCssClass="FondoAplicacion">
                                </ajaxToolkit:ModalPopupExtender>
                            </td>
                        </tr>
                        <tr>
                            <td>Id Material: </td>
                            <td>
                                <asp:TextBox ID="txtIdMaterial" runat="server" Text='<%# Bind("idMaterial") %>'/>
                            </td>
                        </tr>
                        <tr>
                            <td>Estado: </td>
                            <td>
                                <asp:TextBox ID="txtEstado" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>Cantidad: </td>
                            <td>
                                <asp:TextBox ID="txtCantidad" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                    </table>
            </fieldset>
        </td>
    </tr>
</table>
<fieldset>
    <legend>Detalle Orden</legend>
    <asp:GridView ID="GridView2" runat="server">
    </asp:GridView>
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server">
    </asp:ObjectDataSource>
</fieldset>
    
    <asp:Panel ID="pnlMaterial" runat="server" CssClass="CajaDialogo">
    <fieldset>
    <legend>Buscar Material</legend>
        <asp:RadioButton ID="RadioButton1" runat="server" Text="Descripción" 
            GroupName="Radio" />
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <asp:RadioButton ID="RadioButton2" runat="server" Text="Proveedor" 
            GroupName="Radio"/>
    <br />
    <br />
    Buscar:&nbsp;&nbsp;&nbsp;    
    <asp:TextBox ID="txtCriterio" runat="server" Width="206px"></asp:TextBox>
    &nbsp;&nbsp;&nbsp;&nbsp;
    <asp:Button ID="botonBuscar" runat="server" Text="Buscar" 
            onclick="botonBuscar_Click" />
        <br />
    <br />
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate> 
            <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
            AllowPaging="True" AutoGenerateSelectButton="True" 
                    DataKeyNames="idMaterial" 
                    onselectedindexchanged="GridView1_SelectedIndexChanged" 
                    CssClass="CajaDialogo">
        <Columns>
            <asp:BoundField DataField="idMaterial" HeaderText="Id Material" 
                SortExpression="idMaterial" />
            <asp:BoundField DataField="descripcion" HeaderText="Descripción" 
                SortExpression="descripcion" />
            <asp:BoundField DataField="Proveedor" HeaderText="Proveedor" 
                SortExpression="Proveedor" />
        </Columns>
    </asp:GridView>
            </ContentTemplate>
            <Triggers>
                <asp:AsyncPostBackTrigger ControlID="botonBuscar" EventName="Click" />
            </Triggers>
        </asp:UpdatePanel>
        <br />
        <asp:Button ID="btnAceptar" runat="server" Text="Aceptar" />
        <asp:Button ID="btnCancelar" runat="server" Text="Cancelar" 
            onclick="btnCancelar_Click" />
    </fieldset>        
    </asp:Panel>
</asp:Content>
